<div class="right_panel" style="width: 240px">
    <form id="install" action="index.php?tab=install" method="post" onsubmit="return check()">
    <fieldset id="db">
        <h3>Database</h3>
        <div id="db_update" class="update">&nbsp;</div>
        <dl>
            <dt><label for="db_dbms"><strong><acronym title="Database Management System">DBMS</acronym></strong></label></dt>
            <dd>
                <select name="db_dbms" id="db_dmbs">
                    <option value="mysql">MySQL</option>
                    <option value="mysqli">MySQLi</option>
                    <option value="postgres">PostgreSQL</option>
                </select>
            </dd>
        </dl><dl>
            <dt><label for="db_hostname"><strong>Hostname</strong></label></dt>
            <dd><input type="text" name="db_hostname" id="db_hostname" size="15" /></dd>
        </dl><dl>
            <dt><label for="db_name"><strong>Database</strong></label></dt>
            <dd><input type="text" name="db_name" id="db_name" size="15" /></dd>
        </dl><dl>
            <dt><label for="db_username"><strong>Username</strong></label></dt>
            <dd><input type="text" name="db_username" id="db_username" size="15" /></dd>
        </dl><dl>
            <dt><label for="db_password"><strong>Password</strong></label></dt>
            <dd><input type="password" name="db_password" id="db_password" size="15" /></dd>
        </dl><dl>
            <dt><label for="db_table_prefix"><strong>Table Prefix</strong></label></dt>
            <dd><input type="text" name="db_table_prefix" id="db_table_prefix" size="15" value="ob_" /></dd>
        </dl><dl>
            <dd><input type="button" name="db_test" id="db_test" value="Test Database Details" onclick="test_db()" /></dd>
        </dl>
    </fieldset>
    
    <fieldset style="margin-top: 20px" id="ldap">
        <h3>LDAP</h3>
        <div id="ldap_update" class="update">&nbsp;</div>
        <dl>
            <dt><label for="ldap_hostname"><strong>Hostname</strong></label></dt>
            <dd><input type="text" name="ldap_hostname" id="ldap_hostname" size="15" /></dd>
        </dl><dl>
            <dt><label for="ldab_base_dn"><strong>Base DN</strong></label></dt>
            <dd><input type="text" name="ldap_base_dn" id="ldap_base_dn" size="15" /></dd>
        </dl><dl>
            <dt><label for="ldap_admin_users"><strong>Administrators</strong></label></dt>
            <dd><input type="text" name="ldap_admin_users" id="ldap_admin_users" size="15" /></dd>
        </dl><dl>
            <p>
                <input type="checkbox" name="ldap_v3" id="ldap_v3" checked="checked" />
                <label for="ldap_admin_users"><strong>Use LDAPv3</strong></label>
            </p>
        </dl><dl>
            <dt><label for="ldap_admin_users"><strong>User CN Identifier</strong></label></dt>
            <dd><input type="text" name="ldap_user_cn" id="ldap_user_cn" size="15" value="cn" /></dd>
        </dl><dl>
            <dd><input type="button" name="ldap_test" id="ldap_test" value="Test LDAP Details" onclick="test_ldap()" /></dd>
        </dl>  
    </fieldset>
    <dl>
        <dd>
            <input type="submit" name="submit" id="submit" value="Install OpenBooking" />
        </dd>
    </dl>
    </form>
</div>

<div style="margin-right: 250px;">
    <h2>OpenBooking Installation</h2>
    <p>Welcome to <strong>OpenBooking</strong>. This page is designed to automate installation and configure the 'config.php' file, and will perform database initialisation. This file can be edited manually after installation, and contains database and administration information for the application.</p>
    <p>Please be aware that your PHP installation <strong>must</strong> have the <em>php-mysql</em> and <em>php-ldap</em> extensions installed. To install OpenBooking, you must have the following information:</p>
    <ul>
        <li style="list-style: none"><h3>Database (MySQL)</h3></li>
        <li><strong>Hostname</strong> - the address of the server</li>
        <li><strong>Database</strong> - the name of the database on the server</li>
        <li><strong>Table Prefix</strong> - the prefix that you would like to use for OpenBooking database tables. Defaults to "ob_".</li>
        <li><strong>Username and Password</strong> - the login credentials OpenBooking will use to connect to your database</li>
        
        <li style="list-style: none"><h3>LDAP</h3></li>
        <li><strong>Hostname</strong> - the address of the LDAP server to use for authentication</li>
        <li><strong>Base DN</strong> - the base lookup within your LDAP directory that will contain your users</li>
        <li><strong>Administrator username(s)</strong> - the usernames of network users that you would like to add as administrators</li>
    </ul>
    
    <p>You can test the log-in credentials for both the Database and LDAP servers by clicking the appropriate button on the right. When you have verified both sets of credentials, click "Install" to install OpenBooking.</p>
    <p><strong>By installing OpenBooking, you accept the conditions of the <a href="index.php?tab=license">Mozilla Public License, Version 1.1</a>.</strong></p>
</div>
